package com.yunji.base.engine.generate;


import cn.hutool.core.date.DateUtil;
import com.yunji.common.constant.PrefixConstant;
import com.yunji.system.context.SystemUtil;

public class BaseDataCodeGenerate {

    private static final String SITE_AUDIT_CODE_FORMAT = "yyMMddHHmmss";

    public static String generateSiteAuditCode(String prefix) {
        String currentTime = DateUtil.format(DateUtil.date(), SITE_AUDIT_CODE_FORMAT); // 格式：yyyyMMdd
        // 拼接WDD + 日期 + 时间
        String key = prefix+ currentTime;
        return key + String.format("%02d",SystemUtil.getIncrementKey(key));
    }

}
